package edu.gatech.coc.sirana.graph;

import java.util.ArrayList;
import java.util.Collection;

import edu.gatech.coc.sirana.parser.ClientLogItem;

public class Util {
	public InteractionCycle createICfromSublist(int startPos, int endPos, ArrayList<ClientLogItem> itemList){
		ArrayList<ClientLogItem> itemsOnCycle = new ArrayList<ClientLogItem>();
		for (int i=startPos; i<endPos; i++){
			itemsOnCycle.add(itemList.get(i));
		}
		
		return new InteractionCycle(itemsOnCycle);
	}
	
	public void addInteractionCycle(Collection<InteractionCycle> cycleList, InteractionCycle ic){
//		if (!ic.isIn(cycleList)) cycleList.add(ic);
		cycleList.add(ic);
	}
}
